﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Hotel.WPF.HotelWCFSurIIS;

namespace Hotel.WPF.ui.Chambre
{
    /// <summary>
    /// Interaction logic for UserCtrlChambre.xaml
    /// </summary>
    public partial class UserCtrlChambre : UserControl
    {
        Chambre_Hotels _ch;
        public UserCtrlChambre(Chambre_Hotels ch):this()
        {
            
            try
            {
                this._ch = ch;
                contenuBT.Width = this.Width;
                contenuBT.Height = this.Height;
                contenuBT.Margin = new Thickness(0);
                
                contenuBT.Inlines.Add("Chambre : " + _ch.Numero_Chambre);
                contenuBT.Inlines.Add(new LineBreak());
                contenuBT.Inlines.Add(new LineBreak());
                contenuBT.Inlines.Add("Statut : " + _ch.Statut_ID);
                contenuBT.Inlines.Add(new LineBreak());
                contenuBT.Inlines.Add(new LineBreak());
                contenuBT.Inlines.Add("Etage : " + _ch.Nombre_Etage_Chambre);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public UserCtrlChambre()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show(((TextBlock)button1.Content).Text);
            try
            {
                W_Hotel.pageEncours = new ui.Chambre.P_Chambre(_ch);
                W_Hotel.pageEncours.Margin = new Thickness(0);
                W_Hotel.framePage.Navigate(W_Hotel.pageEncours);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
